﻿using Enter.Admin.Enums;
using Enter.Admin.Utils;
using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;

namespace Enter.Admin.Dtoes
{

    public class CalendarModel
    {
        public CalendarModel(DateTime date)
        {
            Date = date;
        }
        public DateTime Date { get; set; }
        public int SealOutTimeCount { get; set; }
        public int RenewalTimeCount { get; set; }
        public int CourtTimeCount { get; set; }
        public string Message {
            get
            {
                return string.Format("{0}个开庭,{1}个委托到期,{2}个保全到期", CourtTimeCount, RenewalTimeCount, SealOutTimeCount);
            }
        }

        public List<string> Details { get; set; }
    }

    [Table(Name = "Archive")]
    public class CalendarSelectModel
    {
        /// <summary>
        /// 序号
        /// </summary>
        [Excel(HeaderName = "序号")]
        public long Id { get; set; }
        
        /// <summary>
        /// 合同编号
        /// </summary>
        [Excel(HeaderName = "合同编号")]
        public string ContractNo { get; set; } = string.Empty;

        /// <summary>
        /// 管护人
        /// </summary>
        [Excel(HeaderName = "管护人", Drop = "Employ")]
        public long ChargeUserId1 { get; set; }
        /// <summary>
        /// 负责人
        /// </summary>
        [Excel(HeaderName = "负责人", Drop = "Employ")]
        public long ChargeUserId2 { get; set; }

        /// <summary>
        /// 开庭日
        /// </summary>
        [Excel(HeaderName = "开庭日")]
        public DateTime CourtTime { get; set; }
        /// <summary>
        /// 保全到期日/查封、冻结到期日
        /// </summary>
        [Excel(HeaderName = "保全到期日")]
        public DateTime SealOutTime { get; set; }
        /// <summary>
        /// 委托到期日/续聘到期日
        /// </summary>
        [Excel(HeaderName = "委托到期日")]
        public DateTime RenewalTime { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get; set; }
    }
}
